<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::group(['middleware' => 'sign_request'], function (){
    Route::match(['get', 'post'], 'app/index', 'AppController@index'); //应用入口
});

Route::match(['get', 'post'], 'login', 'LoginController@login'); //PC端登录

Route::group(['namespace' => 'Admin', 'prefix' => 'admin'], function (){

    Route::group(['prefix' => 'index'], function (){
        Route::match(['get', 'post'], 'index', 'IndexController@index'); //首页
        Route::match(['get', 'post'], 'index_v1', 'IndexController@index_v1'); //v1_首页
        Route::match(['get', 'post'], 'list', 'IndexController@list'); //问题列表

    });

    Route::group(['prefix' => 'knowledge'], function (){
        Route::match(['get', 'post'], 'index', 'KnowledgeController@index'); //知识列表
        Route::match(['get', 'post'], 'content', 'KnowledgeController@content'); //知识列表
        Route::match(['get', 'post'], 'detail', 'KnowledgeController@detail'); //知识详情

    });

    Route::group(['prefix' => 'tool'], function (){
        Route::match(['get', 'post'], 'index', 'ToolController@index'); //表单构建器


    });

});

Route::group(['namespace' => 'Mobile', 'prefix' => 'mobile'], function(){

    Route::match(['get', 'post'], 'login', 'LoginController@login'); //移动端登录

    Route::group(['middleware' => 'mobileLogin'], function (){
        Route::match(['get', 'post'], 'aisee', 'IndexController@getAiseeUrl'); //移动端登录
    });

});

Route::match(['get', 'post'], 'replyToUser', 'NoticeController@replyToUser'); //

Route::group(['namespace' => 'Weixiao', 'prefix' => 'weixiao'], function(){

    Route::match(['get', 'post'], 'face/index', 'FaceController@index'); //人脸采集上传

});
